<style>
.title {
	background: none repeat scroll 0 0 #F7F7F7 !important;
    color: #666666;
    text-align: center;
    width:20%
}
.notfound {
	text-align:center; 
	color:red; 
	font-weight:bold; 
	font-size:20px
}
</style>
<link rel="stylesheet" href="/media/system/css/modal.css" type="text/css" />

<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/modal.js" type="text/javascript"></script>
<script type="text/javascript">
	window.addEvent('domready', function() {

		SqueezeBox.initialize({});
		SqueezeBox.assign($$('a.modal'), {
			parse: 'rel'
		});
	});
</script>

<div>
	<form  name="frmProduct" id="frmProduct"  action="" method="post"> 
		<div>
		    <p>Code <input type="text" class="txt_search" name="encrypted_code" id="encrypted_code" value="<?php echo($this->search); ?>" />
		    <input type="submit" value="Search" /><p> 
	    </div> 
	</form>
</div>

<?php if (isset($this->dbrow[0]) && count($this->dbrow[0]) > 0):?>
<?php $value = $this->dbrow[0];?>
<div id="products" class="list clearfix">
	<table class="adminlist">
				
		<?php if(($this->config['show_serial_code'])){  ?>
		<tr>
			<td class="title">Serial Code</td>
			<td><?php echo $value->serial_code; ?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_pond_name'])){  ?>
		<tr>
			<td class="title">Pond Name</td>
			<td><?php echo $value->pond_name; ?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_fishclass_name'])){  ?>
		<tr>
			<td class="title">Fish Class Name</td>
			<td><?php echo $value->fishclass_name; ?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_fishclass_content'])){  ?>
		<tr>
			<td class="title">Fish Class Content</td>
			<td><?php echo $value->fishclass_content; ?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_fishclass_image'])){  ?>
		<tr>
			<td class="title">Fish Class Image</td>
			<td><a href="<?php echo 'http://'.$value->fishclass_image?>" class="modal"><img alt="" src="<?php echo 'http://'.$value->fishclass_image?>" style="width:70px;"></a></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_customer_name'])){  ?>
		<tr>
			<td class="title">Customer Name</td>
			<td><?php echo $value->customer_name; ?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_feed_date'])){  ?>
		<tr>
			<td class="title">Feed Date</td>
			<td><?php echo (empty($value->feed_date))?'':date('d-m-Y', strtotime($value->feed_date));?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_sale_date'])){  ?>
		<tr>
			<td class="title">Sale Date</td>
			<td><?php echo (empty($value->sale_date))?'':date('d-m-Y', strtotime($value->sale_date));?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_expired_date'])){  ?>
		<tr>
			<td class="title">Expired Date</td>
			<td><?php echo (empty($value->expired_date))?'':date('d-m-Y', strtotime($value->expired_date));?></td>
		</tr>
		<?php } ?>
		
		<?php if(($this->config['show_status'])){  ?>
		<tr>
			<td class="title">Status</td>
			<td><?php echo $value->status; ?></td>
		</tr>
		<?php } ?>				
	</table>			
</div>
<?php elseif($this->search):?>
<div class="notfound">Không tìm thấy sản phẩm</div>
<?php endif;?>		